package com.kl.seckill.config;

import com.kl.seckill.pojo.User;

/**
 * 存储用户实体
 */
public class UserContext {

	private static final ThreadLocal<User> userHolder = new ThreadLocal<>();

	public static void setUser(User user) {
		userHolder.set(user);
	}

	public static User getUser() {
		return userHolder.get();
	}
}
